home *** CD-ROM | disk | FTP | other *** search
- /*
- GDInfo.h
-
- This structure is used by GDInfo.c, TestClut.c, and TimeVideo.c. The intent is
- to allow the test routines to accumulate all the test information in one
- convenient structure that the high level program could intelligently summarize.
- Originally the low-level test routines spat out results as they went along,
- which resulted in an undigestible mass of information.
-
- This is still subject to change. Any suggestions?
- */
-
- typedef struct {
- // clutTest: filled in by TestClut.c
- short tests; // number of clut entries tested
- short errors;
- struct{
- short errors; // failed rgb write/read test, assuming color mode
- short zeroStartErrors; // failed rgb write/read test, " " , with start==0
- }color;
- struct{
- short errors; // failed rgb write/read test, assuming gray mode
- short zeroStartErrors; // failed rgb write/read test, " " , with start==0
- }gray;
- struct{
- short tests;
- short errors;
- short zeroStartErrors;
- }visual; // vs standard flags==0 cond.
- Boolean hashTest,hash; // visible artifacts during clut loading
- }VideoCardClutTest;
-
- typedef struct {
- Boolean visual; // Requested by user.
- Boolean basicTest,timeTest,clutTest; // What's been tested.
- // basicTest: these are filled in by GDInfo.c
- short m; // current mode index =mode&7.
- short mode,gdType; // current state
- Boolean isGray; // current state
- Boolean setEntriesQuickly,gdGetEntries; // compatible
- char cardName[100],driverName[100];
- short slot,width,height,dacSize,dacMask;
- struct{
- // timeTest: these are filled in by GDTime() in GDInfo.c
- short pixelSize; // zero if mode is invalid, otherwise 1<<m
- short colors,pages;
- double frameRate,vblPerFrame;
- double movieRate,movieRateQuickly;
- double framesPerClutUpdate,framesPerClutUpdateHighPriority
- ,framesPerClutUpdateQuickly;
- double missingFramesPerClutUpdate,missingFramesPerClutUpdateHighPriority
- ,missingFramesPerClutUpdateQuickly;
- // These are filled in by TestClut and VisibleHash in TestClut.c
- VideoCardClutTest clut,clutQuickly;
- } depth[6]; // Indexed by "m".
- } VideoCard;
-
- OSErr GDInfo(GDHandle device,VideoCard *card);
- OSErr GDTime(GDHandle device,VideoCard *card);
- OSErr TestClut(FILE *o[2],GDHandle device,short flags,VideoCard *card);
- OSErr TestClutVisually(GDHandle device,short flags,VideoCard *card);
- OSErr SetEntriesQuicklyVsGDSetEntries(GDHandle device,VideoCard *card);
- OSErr TestClutHash(GDHandle device,SetEntriesFunction function
- ,VideoCardClutTest *clut);
-
- enum{testClutQuicklyFlag=1,testClutSeriallyFlag=2
- ,testClutNegativeFlag=4,testClutLinearFlag=8
- ,testClutVisually=16};
-